//
//  CIconView.h
//  IconMaster
//
//  Created by 为为 on 13-6-6.
//  Copyright (c) 2013年 为为. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "SpriteView.h"

#define ICON_RADIUS     14

@interface CIconView : UIView
{
	__weak IBOutlet UIImageView *backgroundImageView;
	__weak IBOutlet UIImageView *frameImageView;
	__weak IBOutlet UIView *gradientView;
	__weak IBOutlet SpriteContainerView *spriteContainer;
	
}

+ (CIconView*)iconViewFromNib;
+ (CIconView *)iconViewFromNibWithCornorRadius;

- (UIImage*)getBackgroundImage;
- (void)setBackgroundImageWithName:(NSString*)imageName;
- (void)setBackgroundImage:(UIImage*)image;
- (void)setBackgroundImageViewColor:(UIColor*)color;
- (UIImage*)getFrameImage;
- (void)setFrameImageWithName:(NSString*)imageName;
- (void)setFrameImage:(UIImage*)image;
- (void)addSpriteWithImage:(UIImage*)image;
- (void)addSpriteWithName:(NSString*)imageName;
- (void)addSprite:(SpriteView*)sprite;
- (SpriteContainerView*)spriteContainer;
- (void)setGradientColor:(UIColor*)color;
- (void)setGradientLocation:(CGFloat)location;

- (UIImage*)iconImage;

@end
